<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://"
      + request.getServerName() + ":" + request.getServerPort()
      + path + "/";
%>
<html>  
<head>
  <base href="<%=basePath%>" /> 
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>跳转目标</title>
<script src="js/jquery-1.11.2.min.js"></script>  
</head>  
<body>  
<p> 测试</p>

<script type="text/javascript">
 $(function(){ 
	obj =setInterval(timer,1000);	
 	function timer(){
 		$.ajax({
             type: "POST",
             url: "serverController/message",
             data: {
                 type: 0
             },
             success: function(data) {
                 console.log(data);
                 var d=eval('(' + data + ')');
                 console.log(d.flag);
                 if(d.flag==0){
                	 window.location.href="mainView/student/client.jsp"
                 }
             }
         });
 		
 		
 	}
	 
	 	 
 })
        
        		        		

    </script>
</body>  
</html>  
